Non-patent Literature 1 discloses a technique in which sorting of orders of rows of a matrix and sorting of orders of elements of a vector are performed by secure computation, with respect to the matrix of which elements are concealed and vectors which corresponds to each row of the matrix and includes concealed elements, in accordance with the elements of the vectors while keeping the elements concealed. Non-patent Literature 2 discloses a technique in which computation for counting the number of times of appearance (the number of pieces of duplication) of an identical element (referred to below as “step computation”) is performed while keeping the elements concealed and concealed results are outputted. FIG. 1 illustrates a general outline of the step computation. Here, ∥ ∥ is a symbol representing a concealed state. Since ∥1∥ which is the first element of the input appears for the first time, the first element of the output is ∥1∥. Since ∥2∥ which is the second element of the input appears for the first time, the second element of the output is ∥1∥. Since ∥2∥ which is the third element of the input appears for the second time, the third element of the output is ∥2∥. Since ∥3∥ which is the sixth element of the input appears for the third time, the sixth element of the output is ∥3∥. Thus, through the performance of the step computation, the number of times of appearance of an identical element (the number of pieces of duplication) is counted and a result thereof is outputted. Non-patent Literature 3 discloses a technique in which a plurality of matrices of which elements are concealed are coupled based on concealed elements of vectors corresponding to respective matrices with a small amount of communication. Non-patent Literature 4 discloses a technique for concealing data (distribution processing), a technique for reconstructing concealed data (reconstruction processing), a technique in which addition, multiplication, and verification (verification of whether two concealed data are equal to each other) are performed in a state that the concealed data are kept concealed so as to obtain concealed results, and the like.